Simplified the path utilities methods. Also, now it accepts URIs. Added
more tests for these new cases, and adapted the old to the changes.