Changed chunk filenames to use MD5s

Also fixed exception thrown when a project has no files in it.