Add test_download_flat_image function