finance.fetch_historical_yahoo: Create directories leading up to cachename.

Previously, if cachename was specified, it would create the directories to
cachedir instead, resulting in OSError if the directories leading up to
cachename were not specified.
finance: Use context manager to close files.

Previously, the urllib object opened in fetch_historical_yahoo was not
explicitly closed.
Merge pull request #1834 from mgiuca-google/finance-cachename

finance: Fixed making directories for explicit cachename