keeping only 4 parts of directory path