Try to create temp directory
Use more explicit exit codes
Check for mkvmerge when using avisynth
Check if file exists