changed path to fpath and added and other changes from brian b github.
mirroring now works