Add option for replacement string

Sometimes it comes in handy when you can replace the unsafe characters with a replacement character like _ for example.