CMS-2174 Make ResourceRequests generate correct URLs when app deployed i...

...n a webapp context

Fix bug in api_rest.Path to make it behave right in case of absolute == false