handle path containing ./ or ../