implementation of FileSystem.isValidScratchName()