Add support for extensions

add support for include_extensions and exclude_extensions