Added option to save snapshot to photos

Added option in settings to save snapshot to photos.
Added code to do the saving if the option is selected.
Fixed some indetions that were spaces rather than tabs.