[bin/checkforsync] Implemented parts with dmenu.

This improves the declaration of the programs to start and fixes a bug that let the urxvt window stay open forever.