Use sed instead of perl

Perl was causing issues on my server so I went ahead and used sed to do the text processing.

Signed-off-by: Rohit Yadav <rohit.yadav@wingify.com>