Check if directories exist before uploading

If the directories to which we upload the maintenance file doesn't
exist, the task fails without any helpful explanation. To get rid of
this bug, test if the directories exist and create them if necessary.
Merge pull request #18 from runar/master

Check if directories exist before uploading