Remove a dependency on GNU sed / replaced with python code