Improve code to detect singleton apps

 o Code moved to a centrla function
 o Search is done using the command line first, then the caption
 o Some apps launch a program and the commandline disappears, caption is inconsistent (video - Make Youtube). We should put this in common.