Added support for "AppID"

For singleton-like apps, the appid makes it possible to provide
a regular expression which will be used by "pgrep" to decide if
the app is running or not.