Refactored plugin

Added a safety check on dropbox path when uploading a folder.  Fixed a
bug introduced from last night's code binge.