Init patchRcPath hooks, which provides utilities to patch shell scripts to be sourced by users. Add test cases and documentation.