adding a safe_format function

The safe_format function will take a string, args and kwargs and format the given string safely so only the given params are filled.

Signed-off-by: Kyle Rockman <kyle.rockman@mac.com>