Fix testRebuildSite, add tests for refresh