add closedir to simleshell commands that open directories