Added a test with a URL that refers to a parent directory, and fixed a
bug that this exposed.