downcase path comparison in application directory test

Fix issue #2788