Changed \s pattern in sed regex pattern to [[:space:]]. This should make the sed pattern portable across GNU and BSD implementations.