Fixed a few bugs, along with making the handling of periods in file extensions consistent