OpenVZ backported some patch that affected the getcwd logic, so this should fix it