fixed symlink bug

The mime-encoding of a symlink is binary; the new version of this script
follows links to find the correct mime-encoding.