compile and test command handling improvement

- Now compile and test commands are handled according to the existence
  or not of root directory and build root directory of a project.

- Also projectile's commands for the equivalent project get updated.