Fix breaking embedded resources with getCanonicalPath.