Fixed extract_dir check.