considered a bug related to multiple periods in file names; refactored to compensate
made things look a little nicer; found that even trivial test is not so trivial