fix creting temporary file for bashrc, cleaneaning code, fix #2304
assume true no matter if something was removed from /etc/bashrc or not, update #2304