Add function for splitting path into directory and name parts.