Redmine#5701: rename bin_dir to dir_bin for consistency with def.cf

(cherry picked from commit 1083dfa01c77756663106c5d2200a2c1acd4aa6c)
Redmine#5701: only set permissions for agents and optional_agents, not all of dir_bin

(cherry picked from commit 4f480df893885fabaf4201b2fc94211a1146fbec)
Redmine#5701: set recursive permissions for sys.workdir/bin if it is /var/cfengine/bin

(cherry picked from commit 40e00d159d4b650f1ebbb6d4baa55e7eb3aa4d16)