added "dirName" and "baseName" utility functions