Some necessary changes that make agent runnable on rhel

These are some changes on the agent that make it runnable on rhel. 

Next step, I am going to refactor on the platform/ubuntu. In that platform there are lots of things that are common in Linux.