fs.parsefilename implementation