Refactored script to ask for 'sudo' if necessary.

* New configuration parameters for file and folder permissions