Updated dependency-checking script

Should work properly now in terms of reading from the files line by line.