Get n specific segments of a file path, e.g. first 2, last 3, etc.