parse_path function

Parse file path into useful components