cronjob binary path depends on platform

also refactored some tests

Change-Id: I7ef1082a515898efd26be398fa30d32b756c27c3