Use uigetdir to select directory to analyse

Analysis code for SOC altered so you can select dir