Fixed an error in the filesystem functions.