Fixed the example and added tests for the tables archiving script.