Added tests to /sites* end points. See #2.

When writing the tests a few bugs have been discovered. See ticket #49,
ticket #50, #51 and #52.
Merge pull request #53 from yeukhon/b192ddea0d8a71e70e9786fe85e8535963efac6a

Pull request for /sites api tests