Factored out path util methods.