fixed bugs in resource url normalization & added doctests
fixed invalid relative file URI usage in doc tests