sanitize extensions

add option to sanitize the extension of documents. this is turned *on*
by default and still needs documentation.