Add tests for sorting directory table