Function getCurrentDirectory