Added ability to get file extensions.

Added ability to get file extensions.
Minor bug fixes and tweaks.