fixed path for sourcing functions.bash and preferencs.conf and added '-L' option to curl to follow redirects.