Andrew Barrowman has signed a short-term contract at Dundee following his release by financially-crippled Dunfermline.