keep track of current working directory and set accordingly