Fixed up minor errors in script while using sed.