Fix some test failures caused by File.getCanonicalPath() failing due to

path not pointing to a valid resource on the platform.