Fix bugs on contact export.
Merge pull request #6 from kapt/nph

Fix bugs on contact export.
Somehow hadn't noticed this till now, sorry!