output_directory bugfix

- Fixes an error that would cause the output_directory setting to copy
the original file instead of the newly created output file.