Also see this thread for some more information:
http://forums.chaosgroup.com/showthread.php?70583-output-passes-to-separate-folders/page3
You don’t need to render the temp bitmap, just save it first and then assign.
Also, you can replace (getFilenameType “*.exr”) with “.exr”. ; )