Fix issues with sed usage with GNU and BSD sed. Signed-off-by: Alexander Trost <galexrt@googlemail.com>