[pyqgis-console] uses QFileInfo instead of os.path to check if file exists
- minor fixes and cleanup