refactors into functions
replaces tabs with spaces
fixes typos
adds function to check if a dir exist via ssh
adds checking for dirs via ssh and create them if non existsne
all shell commands now use the same function (both ssh and non ssh)
Merge branch 'develop'