Improve permission handling when using self-update
minor #14 Improve permission handling when using self-update (jeremy-derusse)

This PR was merged into the master branch.

Discussion
----------

Improve permission handling when using self-update

I replace the `file_get_content` by a `@copy + file_exists` to avoid to download the file twice.
I replace the rename by a `file_put_content` in case we have permission on the file and not on the directory
I detect common permission errors before starting the download

Fixes #5

Commits
-------

23b2f2a Improve permission handling when using self-update