adding dirname, fixing filename so it contains the full path and file extension, updating example files to spit out the filename and dirname for debugging
Merge pull request #163 from doowb/master

Fixing filename, adding dirname, and updating tests