Implement option to just build a static library.
Simplified the code of expand_path()