added stripDirs option