Fixed OSX sed compatibility