refactor(service): touch/chown log and pid files as 'mast'

Also test if run as 'root' or 'sudo'