improve logic of getParentPath and getBaseName and add more tests