add workaround for KDE file dialog bug

KDE file dialog bug: cannot get selected file type
add function to detect KDE using /proc