Fix multiple bugs in Idf.py

This fixes a bugfix that was not merged correctly,
http://www.freecadweb.org/tracker/view.php?id=1366.

Secondly it fixes a path.