Refresh tokens while uploading files to box

The code did not check that the access token was valid while uploading a file to box. This patch refreshes the token and then uploads the file.