Use "set" to set shell options

-> So that invoking script as `bash <script>` still
   sets the option correctly.
-> Minor fix: error messages should be written to stderr