Add spec for File.expand_path not returning frozen strings

Extract from #2288
Return a dup of ENV["HOME"]

Values returned from ENV are frozen by default, but File.expand_path
should not return a frozen string.

Fixes #2288