Made some directory member functions const.