Refactoring the way of managing files in tests to use FactoryGirl.