Fix @somatonic issue #317 fixing a typo where $dir should have been $path