Fix NPE when using local directory for out file
Merge pull request #3 from yawkat/master

Fix NPE when using local directory for out file