Add options to build_from_dir classmethod