Fix of file and folder splitting

Fixed way to split file and folder names