fixes long filenames
fixed minor undefines bug
Merge pull request #110 from scopatz/hash-filename

fixes long filenames