Make transformer ignore code with invalid filename

The transformFn should handle missing or non-string filenames since the
filename argument to vm.runInThisContext is optional.