添加日志目录和文件的路径检查，防止注入攻击

modified:   app/controllers/application_controller.rb
modified:   app/controllers/view_logs_controller.rb
new file:   config/.gitignore
modified:   config/log_dir.yml