improved error handling
better location of gallery var directory
and handles album names with funny characters (e.g. open and close brackets)