Added parameters to generalize the download_mnist function.