reworked decompose path, standarize_path for correct behaviour