Flask app to organize image directories with auto thumbnail generation