Fix logic in Makefile determination

When checking path lengths, the code was
checking the path on one side and the
pathname on the other, causing issues with
determining where the root-most Makefile
was.
Merge branch 'master' of github.com:Parent5446/cs587grader