Make detection of LUA_DIR work with nested bin directories

I have a multi-arch setup in my home directory which uses subdirectories of ~/local/bin for arch-specific binaries (ugly, but it's the best I can do, by analogy with lib; it is compatible with autotools build systems).

This small patch fixes detection of LUA_DIR for this case, and should be safe in other cases.