fix sourcing of bash completion files
sanitising mappings
improving error mesgs
fix get parent pid