fix type signature for currentDirectory