add tests for GEM_HOME / PATH mismatch problems, update #2050