fixes #9, now works well with spaces in filenames