check for gnome-session with more methods

Checking for a process is refactored into _process_is_running
function. This function also uses /bin/pidof and /usr/bin/pgrep to
check for a running process.
add .travis.yml