export.sh: Check for previous build properly