Fix for issue #5

 - Fix for BSD sed version
 - Thanks to Stefan Mielke