Fixed working directory code to make it more pip friendly