Fixes file spec in Ruby < 2.1