add helper function to add bin, lib, ... from a path