Fix for empty paths breaking in getCanonicalPath().