Fix the build script to work properly

Missing apt-get update/apt-get upgrade would cause some issues.