dir should be relative to your site source. adding a leading slash would be inconsistent with that. dir is used for `mkdir_p`, so it would be a problem to have the first slash. strip it from dir!