Add dynamic path before running hist2workspace and define env ROOTSYS  when running in ctest