fixed getabsoluthepath function