use sudo outside of func scope
Merge pull request #134 from finder/master

Fix for sudo in file_upload