[TIMOB-10223](3_2_X) Backport - Handle external directory properly

[Jira ticket](https://jira.appcelerator.org/browse/TIMOB-10223)

Backport of #5347