make sure that install space exists when creating env.sh file for cmake projects (fix #340)