changed the way of getting user home as well as how to copying job script to user home

refactoring

changed the way of getting user home