File reading update

Made sure that the files get the entire filepath, not just the name.
Also made loops more pythonic