Preheat oven to 350 degrees F. Grease and flour an 8x8-inch baking pan. In a pot over low heat, melt butter; stir in molasses, water, and sugar. Remove from heat and add egg. Sift dry ingredients together and add them to the butter mixture. Pour into pan and bake for 30 minutes.