Use File.expand_path instead of File.dirname