Abandoning concept of a single base document.

Has bugs.
Bug fixes.
Merge pull request #12 from ag-csw/recursive-ralph

Recursive ralph
adding case P to the list of test cases
writing out XMLCatalog only if it contains at least one mapping
Merge pull request #17 from greenTara/recursive-ralph

fixing issue #13
Merge pull request #18 from ag-csw/recursive-ralph

Merging latest changes with master branch