Limit number of apt udpates

Added code to check if the apt cache has successfully been updated in the last 24 hours. This prevents it from running 'apt-get update' every single time the node checks in.