Syntax fixes

Some small fixes for syntax on sed regexes that are a bit too over zealous.