Modified code to use subprocess instead of os.system

Fixes Kontact not being registered before getting kmail service from
dbus. Sleeping not consistent.