Fix code snippet install script to create directory if it doesn't exist