Trim the next file name

Summary: This removes trailing null characters, meaning the `file_put_contents` in `extractAllTo` doesn't error from a path with a null character in it which happened when trying to extract a file with a name over 100 characters long.

Also matches the behaviour of a non-link file where the filename gets trimmed when read from the header.
Closes https://github.com/facebook/hhvm/pull/3408

Reviewed By: @ptarjan

Differential Revision: D1488803

Pulled By: svcscm