Fixed greedy selection of require paths

Resolves issue 4 opened by kbjr.

Signed-off-by: Ozan Turgut <oturgut@turn.com>