Couple of length checking fixes

875566d fixes \_getFileNameParts expecting just the file and extension (`/oldname/new-file-name.extension`) and not the full path.
bbbcd7e checks filename length which should be 255 characters for most file systems (shame there isn't a `PHP_MAXFILELENGTH`)

I have tested this on Linux and Windows. Feel free to refactor as I can see the `setBaseFile` function getting a bit messy. Would be willing to help out with some unit tests.