Add relative extern files to dependencies.
Fix build_dir test.