allow mode to be set in config - addresses #3
convert string config param to octal integer prior to use
merge change from feature branch