fixed bug in checking file name length

I copied v1.7 from sourceforge (since I couldn't submit a pull request or ticket there) and fixed a bug in checking the maximum filename length. The length of the entire path was being compared instead of just the length of the filename.

P.S. Thanks for writing this, it's been much easier than starting up a windows VM just to use a closed-source FATX file browser, which is what I used to do.