Fix error when filename is null

Seen occasionally on Windows when running test/file.jl