Implement 'cat' and 'cd' and do some fixes for 'di' code injection