modified run script to correctly identify directories.
TODO: Do this for the other scripts.