adding 'up' function for navigation up to a specific directory