md5sum's -c option works if you use the relative path of the filename(s) instead of the absolute path. I use this same method to verify files burned to CD/DVD before deleting them.
For example, if the files are in
(or 'cd ~/Download' will work), then
md5sum source/* >> source.md5
. After burning 'source' to the CD/DVD, I use
md5sum -c ~/Download/source.md5
This will print 'OK' for each file found & verified. Missing and/or changed files will report an error.
I normally use 'pushd' and 'popd' in scripts (as well as the shell) instead of 'cd', since it saves the previous directories on the 'dir stack' and makes getting back easier (for me). Also, the variable $OLDPWD is handy (refers to the previous directory).