BZ 1044986 - fix rhqctl script so it doesn't hang when starting the agent in DEBUG mode
(cherry picked from commit b3681f22dd3d7d893f57af56a9be6602111e3d7b)