Fixes regex for pulling file extension.