Added removeDirectory function.