FIX: Use Promise().catch(onRejected) instead of Promise().then(..., onRejected);
FIX: Do not discard path going above root dir with multiple "../" parent selectors.