Bug fixes for resource monitor hooks.

resource_monitor executable was not being copied correctly if the
current directory had a directory called "resource_monitor".