Added sudo and script execution checks.

Install exits before do any operation if root access is not granted (sudo fail).
Also, if a command fails (set -e), script ends to avoid bad installation.
Then, issue could be detected and fixed. But a manual rollback is required.
Merge pull request #23 from varhub/feature/sudo-check

Added sudo and script execution checks.