Fix file names with spaces breaking stat vars

Also fixed colouring symlinked directories.