Fixed some resource leaks in haas_init.py

This was bug number #15 in the CCI-MOC/moc-public repo. The haas is no
longer maintained there; the fix has only been applied to the version in
CCI-MOC/haas.