Fixing hostname substitution

The hostname substitution needed some OS specific sed strings