Minor improvements

- Upgraded Symfony version to 2.3.21
- Changed session directory in production environment
- Updated permissions of cache and logs
- Fixed type checks and code style issues