improved accuracy of tmux session detection

Also added grep -E "^${servicename}:" for more accurate detection of the
tmux session