Fixed all directory problems (including for get and put). Dummy lock-testing functions left out