Added directory locating functionality