Auto-generate index on the file

If the package directory has no index file, generate it automatically on
the fly.
Merge pull request #13 from rejeep/on-the-fly-index

Auto-generate index on the file