Update validate-file.sh

basically re-wrote it
Merge pull request #1 from mcrmonkey/patch-1

Update validate-file.sh