path_traversal: Reduced and moved traversal counts to constants

[Issue #351]