path_rel2abs function

Converts a relative path to an absolute path. It tries really hard to create canonical paths.