Refactored sed routine.
Fixed problem with missing -r flag (extended regexp) in Mac OS X sed version.
Updated changelog.
Merge branch '863-int' into 1.6

Conflicts:
	docs/changelog.rst