make sure cd hook is loaded when testing GEM_HOME warning, update #2050