Add support for writing to a file in the pwd

Before this, you'd get an error if you tried to write bad records
to a file like 'bad_records.txt' (rather than './bad_records.txt)
due to a failure in trying to create the directory. Now you don't
need the "./" prefix.