Financial and Labor Market Imperfections and Investment