added check for undefined response when attempting to upload file to non whitelisted folder

Attempted to upload a .scss file from my sass folder, it failed, and I fixed it. Hope I'm doing this right - first time.