Make css url rewriting also works with absolute pats

Besides the title:
* added unit tests
* refactored to use urlparse rather than os.path

NOTE:
* all css need to be re-uploaded after making a build containing this changeset