xdg-mime, not xdg-open
Added the much shorter bash script