Added tests for directoryIsEmpty.