Updated bash functions to use read line instead of tweaking the IFS variable for parsing directories with spaces.