Add missing TOP_DIR and fix paths to patches, etc.