Check if compile.php target directories exist, exit if not

If it's not run from the correct directory, a spew of warnings appear

Add done message and also one if not running on the CLI

Change-Id: Iec508acf4216aba7d084bb57156b87bfb117ff4a