Make sure we get null-terminated filename.