Add support for overriding the resolved path for a given Module or Dist.

logic for Dist must go in _dist_dir_new() because it is directly called
by _dist_file_new().