escape agent path, so it is handled correctly if it contains backslashes

fixes #4