Added PREVIOUSDIR and WORKINGDIR