Improved handling of -safe-string option