add error handling for daemon script on ubuntu

fix an error that starting tme-mistd twice will overwrite the pid file and let the stopping script fail.

also fix the status function.