Added 1.1 to support normals export!
Requires "Normal" to be enabled under the properties tab -> View layer -> Passes -> Data -> Normal.
Then in the compositing window, you need to add a File Output node and connect the normal from the rendered layer to the File Output node.
Select the File Output node and change the label to 'Normal'. This will let us find and edit the output path which we will set dynamically with the python script.
The above is already done in the downloadable blend file.
Cheers
Foozle