Effect of Template on Structural and Band Gap Behaviors of Magnetite Nanoparticles