fixed bugs in resource url normalization & added doctests
fixed invalid relative file URI usage in doc tests: the file protocol does not allow relative paths