Adding faster interpolation

Not only is it faster, but also better for extrapolation.  This uses
cached interpolation weights.  Very important for large files.  Also
added some improved file management.

Needs checking.